package com.itheima.demo02;

import java.util.TreeSet;

public class MainClass01 {

    public static void main(String[] args) {
        TreeSet<Student> students = new TreeSet<>();
        Student s1 = new Student("张三",80,81,82);
        Student s2 = new Student("李四",90,91,92);
        Student s3 = new Student("王五",100,101,102);

        students.add(s1);
        students.add(s2);
        students.add(s3);

        for (Student student : students) {
            System.out.println(student.toString());
        }
    }
}
